<!DOCTYPE html><html lang="zh-Hans-CN"><head>	<meta charset="UTF-8">	<title>localStorage对象的应用</title>	<style>div{text-align:center;padding:20px;border:10px ridge #005A9C;width:350px;height:250px;margin:0 auto;}	</style></head><body>	<h3>localStorage对象的应用</h3>	<hr>	<div>		<h4>最可爱的人评选(localStorage)</h4>		<img src="45567.jpg" width="80px" height="80px" border="0" alt=""><br>		<p id="result"></p>		<p>刷新页面票数会增长。</p>		<p>请关闭浏览器后重试仍会增长</p>	</div>	<script>		let tickets=0;		localStorage.setItem(tickets,0);		if (localStorage.tickets){			localStorage.tickets=parseInt(localStorage.tickets) +1;	}		else{	localStorage.tickets=1;	}		document.getElementById("result").innerHTML="已投: "+localStorage.tickets + "票";	</script>	<hr>	<p> <script>document.write(document.lastModified);</script> <a href="index.html">返回本章目录</a></p></body></html>